package com.bifrost.model.option;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Builder;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.math.BigInteger;

/**
 * @com.bifrost.model.option
 * @wechat-mall
 * @lee Create Class on 2018/4/16
 */
@Data
public class OptionValueModel implements Serializable{

    private Long productOptionValueId;

    @NotBlank(message = "属性名称不能为空")
    private String attributeValue;

    private Long optionXrefId;
    @JsonIgnore
    private BigInteger displayOrder=BigInteger.ZERO;

    public OptionValueModel(Long productOptionValueId, String attributeValue, Long optionXrefId) {
        this.productOptionValueId = productOptionValueId;
        this.attributeValue = attributeValue;
        this.optionXrefId = optionXrefId;
    }

    public OptionValueModel() {
    }
}
